<template>
  <div class="blog_container">
    <Menu @select="handlerSelect" :list="list"></Menu>
  </div>
</template>

<script>
import Menu from "./components/RightList.vue";

import { getBlogs } from "@/api";
export default {
  components: {
    Menu,
  },
  data() {
    return {
      list: [
        {
          name: "这是1-1",
          isSelect: false,
          children: [
            {
              name: "这是2-1",
              isSelect: false,
              children: [
                { name: "这是2-1-1", isSelect: false },
                { name: "这是2-1-2", isSelect: true },
              ],
            },
            { name: "这是2-2", isSelect: false },
          ],
        },
        { name: "这是1-2", isSelect: false },
        {
          name: "这是1-3",
          isSelect: false,
          children: [
            {
              name: "这是3-1",
              isSelect: false,
            },
          ],
        },
      ],
    };
  },
  methods: {
    handlerSelect(item) {
      console.log(item);
    },
  },
  mounted() {
    getBlogs({ page: 1, limit: 10, categoryid: -1, keyword: "" }).then(
      (res) => {
        console.log(res);
      }
    );
  },
};
</script>

<style></style>
